import sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
app=QApplication(sys.argv)
win=QMainWindow()
win.setWindowTitle("调试版设置窗口背景")
palette=QPalette()
palette.setBrush(QPalette.Background,QBrush(QPixmap('panda.jpg')))
win.setPalette(palette)
win.resize(500,260)




win.show()
sys.exit(app.exec_())